<template>
    <div>
       <div v-for="(item,index) in users" :key="index">{{item}}</div>
       <button @click="updatetitle">子传父</button>
    </div>
</template>

<script>
    export default {
      name:"Users",
      props:{
        users:{
           type:Array,
           required:true,
        }
      },
      data() {
        return {
            title: "hellow world"
        }
      },
      methods: {
        updatetitle() {
            this.$emit("clickzf",this.title)
        }
      },
    }
</script>

<style scoped>

</style>